package pab.ui.auxiliary.checknode;

import java.awt.event.ActionEvent;
import javax.swing.JComboBox;
//http://www.thatsjava.com/java-core-gui-apis/267499/
public class ComboCheck extends JComboBox {

	private static final long serialVersionUID = 1L;
	CheckComboRenderer renderer;
	public ComboCheck() {
	renderer = new CheckComboRenderer();
	setRenderer(renderer);
	addActionListener(this);
	}

	public void actionPerformed(ActionEvent e) {
	System.out.println("action");
	CheckComboStore store = (CheckComboStore) getSelectedItem();
	// CheckComboRenderer ccr = (CheckComboRenderer) getRenderer();
	store.state = !store.state;
	// ccr.checkBox.setSelected(store.state);
	repaint();
	}

	public void setPopupVisible(boolean flag) {
	}

}